package com.gxsyh.nantie.user.management.provider.domain;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

/**
 * @email yom535@outlook.com
 * @author: 刘锋嘉(Liu Fengjia)
 * @date: 2020/1/6
 * @time: 11:50
 * @Description: 
 */
@Data
@Table(name = "tb_department")
public class TbDepartment implements Serializable {
    /**
     * id
     */
    @JsonSerialize(using= ToStringSerializer.class)
    @Id
    @Column(name = "id")
    @GeneratedValue(generator = "JDBC")
    private Long id;

    /**
     * 部门名字
     */
    @Column(name = "`name`")
    private String name;

    /**
     * 父级id
     */
    @JsonSerialize(using= ToStringSerializer.class)
    @Column(name = "parent_id")
    private Long parentId;

    /**
     * 创建时间
     */
    @Column(name = "createTime")
    private Date createtime;

    /**
     * 更新时间
     */
    @Column(name = "updateTime")
    private Date updatetime;
    /**
     * 1就是机务2就是公寓科
     */
    @Column(name = "type")
    private int type;

    private static final long serialVersionUID = 1L;
}